package com.usian.article.controller.v1;

import com.usian.apis.article.ApCollectionControllerApi;
import com.usian.article.service.ApCollectionService;
import com.usian.model.article.dtos.ArticleInfoDto;
import com.usian.model.article.pojos.ApCollection;
import com.usian.model.behavior.dtos.CollectionBehaviorDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: ApCollectionController
 * Author:   WGG
 * Date:    2022-12-2022/12/1-20:35
 * Version: 1.0
 * Description:
 */
@RestController
@RequestMapping("/article/api/v1")
public class ApCollectionController implements ApCollectionControllerApi {

    @Autowired
    private ApCollectionService apCollectionService;

    @Override
    @PostMapping("/collection_behavior")
    public ResponseResult collectionBehavior(@RequestBody CollectionBehaviorDto dto) {
        return apCollectionService.collectionBehavior(dto);
    }

    @Override
    @PostMapping("/show_collection_behavior")
    public ApCollection showCollectionBehavior(@RequestBody ArticleInfoDto dto) {
        return apCollectionService.showCollectionBehavior(dto);
    }
}
